import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;
import sunwin.yoms.comm.YomsException;
import sunwin.yoms.domain.system.BlogrollDomain;
import sunwin.yoms.service.system.BlogrollService;

/**
 * Created by watson on 2015/8/17.
 */
@ContextConfiguration({"/sunwin.yoms.dao.xml", "/sunwin.yoms.service.test.xml"})
public class BlogrollSericeTset extends AbstractTestNGSpringContextTests {
    BlogrollDomain blogroll;
    String loginName = "yoms.admin";
    String passWord = "123456";
    @Autowired
    private BlogrollService blogrollService;

    //增加友情链接
    @Test
    public void BlogrollServiceCURD() throws YomsException{
        blogroll = new BlogrollDomain();
        blogroll.setBlogrollId(13);
        blogroll.setBlogrollName("bgRd");
        blogroll.setBlogrollContent("迎ew");
        blogroll.setBlogrollUrl("www.xSWeg.com");
        blogroll.setBlogrollImg("huewu");
        blogrollService.createBrogroll(blogroll);
    }

    @Test
    public void order() throws YomsException {
        blogrollService.Up(14);
    }
    @Test
    public void Down()throws YomsException{
        blogrollService.Down(6);
    }


}
